/**
* All Rights Reserved , Copyright (C) 2022 , 青岛鼎信通讯股份有限公司
*
* MmsProductFloorPriceInfoServiceAuto
* 产品红线价格信息表
*
* 修改纪录
* 2022-05-24 版本：1.0 hudeyong 创建。
* @version 版本：1.0
* @author 作者：hudeyong
* 创建日期：2022-05-24
*/

package com.topscomm.mms.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mms.*;
import com.topscomm.mms.pojo.MmsProductFloorPriceInfoEntity;
import com.topscomm.mms.dao.IMmsProductFloorPriceInfoDao;


public class MmsProductFloorPriceInfoServiceAuto extends MmsService<MmsProductFloorPriceInfoEntity,IMmsProductFloorPriceInfoDao> {

	/**
	 * @author: hudeyong
	 * @date: 2022-05-24
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("productline") != null) {
			temp = mapRow.get("productline").toString();
			mapRow.put("dispproductline", datacodeCache.getValueDynamic("ProductLine", temp, "code", "name"));
		}
		if (mapRow.get("catalog1") != null) {
			temp = mapRow.get("catalog1").toString();
			mapRow.put("dispcatalog1", datacodeCache.getValueDynamic("ProductCatalog1", temp, "code", "name"));
		}
		if (mapRow.get("catalog2") != null) {
			temp = mapRow.get("catalog2").toString();
			mapRow.put("dispcatalog2", datacodeCache.getValueDynamic("ProductCatalog2", temp, "code", "name"));
		}
		if (mapRow.get("catalog3") != null) {
			temp = mapRow.get("catalog3").toString();
			mapRow.put("dispcatalog3", datacodeCache.getValueDynamic("ProductCatalog3", temp, "code", "name"));
		}
		if (mapRow.get("publishstate") != null) {
			temp = mapRow.get("publishstate").toString();
			mapRow.put("disppublishstate", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mmsProductFloorPriceInfoDao")
	public void setDao(IBasicDao<MmsProductFloorPriceInfoEntity> dao) {
		super.setDao(dao);
	}
}
